package org.ch02.hw.demo03;

import org.ch02.entity.Student;

import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;

/**
 *
 * @author ZJL
 * @date 2025-03-17
 */
public class MainTest01 {
    public static void main(String[] args) throws Exception {
        //        三、遍历Integer类中所有的字段，格式如下所示
//        public final class Integer {
//            public static final int MIN_VALUE;
//            public static final int MAX_VALUE;
//            public static final Class TYPE;
//            static final char[] digits;
//            static final char[] DigitTens;
//            static final char[] DigitOnes;
//            static final int[] sizeTable;
//            private final int value;
//            public static final int SIZE;
//            public static final int BYTES;
//            private static final long serialVersionUID;
//        }


        Class<Integer> integerClass = Integer.class;
        Field[] declaredFields = integerClass.getDeclaredFields();
        System.out.println("public final class Integer {");
        for (Field field : declaredFields) {
            System.out.println(Modifier.toString(field.getModifiers())+" "+field.getName()+";");
        }
        System.out.println("}");

    }
}
